package bb.lanxing.util;

public class TtsSettingHelper {
    public static final String TTS_DISTANCE_DEFAULT = "KM1";
    public static final String TTS_DISTANCE_KM05 = "KM05";
    public static final String TTS_DISTANCE_KM1 = "KM1";
    public static final String TTS_DISTANCE_KM10 = "KM10";
    public static final String TTS_DISTANCE_KM2 = "KM2";
    public static final String TTS_DISTANCE_KM5 = "KM5";
    public static final String TTS_DISTANCE_No = "No";
    public static final String TTS_DURATION_DEFAULT = "M5";
    public static final String TTS_DURATION_M1 = "M1";
    public static final String TTS_DURATION_M10 = "M10";
    public static final String TTS_DURATION_M2 = "M2";
    public static final String TTS_DURATION_M20 = "M20";
    public static final String TTS_DURATION_M30 = "M30";
    public static final String TTS_DURATION_M5 = "M5";
    public static final String TTS_DURATION_M60 = "M60";
    public static final String TTS_DURATION_No = "No";

    public static int parseTTSDuration(String str) {
        char c;
        switch (str.hashCode()) {
            case 2436:
                if (str.equals(TTS_DURATION_M1)) {
                    c = 0;
                    break;
                }
                c = 65535;
                break;
            case 2437:
                if (str.equals(TTS_DURATION_M2)) {
                    c = 1;
                    break;
                }
                c = 65535;
                break;
            case 2440:
                if (str.equals("M5")) {
                    c = 2;
                    break;
                }
                c = 65535;
                break;
            case 2529:
                if (str.equals("No")) {
                    c = 7;
                    break;
                }
                c = 65535;
                break;
            case 75564:
                if (str.equals(TTS_DURATION_M10)) {
                    c = 3;
                    break;
                }
                c = 65535;
                break;
            case 75595:
                if (str.equals(TTS_DURATION_M20)) {
                    c = 4;
                    break;
                }
                c = 65535;
                break;
            case 75626:
                if (str.equals(TTS_DURATION_M30)) {
                    c = 5;
                    break;
                }
                c = 65535;
                break;
            case 75719:
                if (str.equals(TTS_DURATION_M60)) {
                    c = 6;
                    break;
                }
                c = 65535;
                break;
            default:
                c = 65535;
                break;
        }
        switch (c) {
            case 0:
                return 60;
            case 1:
                return 120;
            case 2:
                return 300;
            case 3:
                return 600;
            case 4:
                return 1200;
            case 5:
                return 1800;
            case 6:
                return 3600;
            default:
                return 0;
        }
    }

    public static int parseTTSDistance(String str) {
        char c;
        switch (str.hashCode()) {
            case 2529:
                if (str.equals("No")) {
                    c = 5;
                    break;
                }
                c = 65535;
                break;
            case 74511:
                if (str.equals("KM1")) {
                    c = 1;
                    break;
                }
                c = 65535;
                break;
            case 74512:
                if (str.equals(TTS_DISTANCE_KM2)) {
                    c = 2;
                    break;
                }
                c = 65535;
                break;
            case 74515:
                if (str.equals(TTS_DISTANCE_KM5)) {
                    c = 3;
                    break;
                }
                c = 65535;
                break;
            case 2309863:
                if (str.equals(TTS_DISTANCE_KM05)) {
                    c = 0;
                    break;
                }
                c = 65535;
                break;
            case 2309889:
                if (str.equals(TTS_DISTANCE_KM10)) {
                    c = 4;
                    break;
                }
                c = 65535;
                break;
            default:
                c = 65535;
                break;
        }
        if (c != 0) {
            if (c == 1) {
                return 1000;
            }
            if (c == 2) {
                return 2000;
            }
            if (c == 3) {
                return 5000;
            }
            return c != 4 ? 0 : 10000;
        }
        return 500;
    }
}